import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { DetailsPage } from './details';

import * as SockJS from 'sockjs-client';
import { StompConfig, StompService } from '@stomp/ng2-stompjs';

import { Device } from '@ionic-native/device';
import { JPush } from '@jiguang-ionic/jpush';

const stompConfig: StompConfig = {
  url: () => {
    // return new SockJS('http://114.116.9.47:8088/stomp/natatorium');
    return new SockJS('http://yyg.server.cloudansys.cn:8088/stomp/natatorium');
  },
  headers: {},
  heartbeat_in: 0,
  heartbeat_out: 20000,
  reconnect_delay: 5000,
  debug: false
};

@NgModule({
  declarations: [
    DetailsPage,
  ],
  imports: [
    IonicPageModule.forChild(DetailsPage),
  ],
  providers: [
    { provide: StompConfig, useValue: stompConfig },
    StompService,
  ]
})
export class DetailsPageModule { }
